import React from "react";
import { DatePicker as AntdDatePicker } from "../../antd/index";
import YearPicker from "./YearPicker";
import MonthPicker from "./MonthPicker";
import TimePicker from "./TimePicker";
import WeekPicker from "./WeekPicker";
import QuarterPicker from "./QuarterPicker";
import RangePicker from "./RangePicker";
import { commonProps } from ".";

import "./style/index";
// type
import { AntdDatePickerProps } from ".";
export type Props = AntdDatePickerProps & {};

class DatePicker extends React.Component<Props> {
  static YearPicker: typeof YearPicker;
  static MonthPicker: typeof MonthPicker;
  static TimePicker: typeof TimePicker;
  static WeekPicker: typeof WeekPicker;
  static QuarterPicker: typeof QuarterPicker;
  static RangePicker: typeof RangePicker;

  constructor(props: Props) {
    super(props);
  }
  render() {
    const datePickerProps = {
      ...commonProps,
      ...this.props,
    };
    return <AntdDatePicker {...datePickerProps} />;
  }
}

export default DatePicker;
